package com.dreamchaser.familydevice.dao;

import com.dreamchaser.familydevice.po.ComStatus;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author shajie
 * @since 2020-08-16
 */
public interface ComStatusMapper extends BaseMapper<ComStatus> {

    /**
     * 获取所有当前状态下的组件变量名
     * @return
     */
    @Select("select var_name from com_status t1\n" +
            "join component t2 on t1.com_id=t2.id and t1.status_code=t2.status_code")
    List<String> selectListVarName();
}
